package com.elnguage.lox;

import java.util.List;

abstract class StellarisStmt{
  interface Visitor<R> {
    R visitBlockStellarisStmt(Block stellarisstmt);
    R visitEventStellarisStmt(Event stellarisstmt);
    R visitHandleStellarisStmt(Handle stellarisstmt);
    R visitCallStellarisStmt(Call stellarisstmt);
  };
static class Block extends StellarisStmt{
Block(List<StellarisStmt> statements) {
this.statements = statements;
}
final List<StellarisStmt> statements;

@Override
<R> R accept(Visitor<R> visitor){
return visitor.visitBlockStellarisStmt(this);
}
}
static class Event extends StellarisStmt{
Event(Token name,List<Stmt> body) {
this.name = name;
this.body = body;
}
final Token name;
final List<Stmt> body;

@Override
<R> R accept(Visitor<R> visitor){
return visitor.visitEventStellarisStmt(this);
}
}
static class Handle extends StellarisStmt{
Handle(Token name,List<Stmt> body) {
this.name = name;
this.body = body;
}
final Token name;
final List<Stmt> body;

@Override
<R> R accept(Visitor<R> visitor){
return visitor.visitHandleStellarisStmt(this);
}
}
static class Call extends StellarisStmt{
Call(Token name,List<StellarisStmt> params) {
this.name = name;
this.params = params;
}
final Token name;
final List<StellarisStmt> params;

@Override
<R> R accept(Visitor<R> visitor){
return visitor.visitCallStellarisStmt(this);
}
}

  abstract <R> R accept(Visitor<R> visitor);
}
